""" URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from . import views

urlpatterns = [
    # 发布新房源
    path('api/v1.0/houses/', views.HouseReleaseView.as_view()),
    # 上传房源图片
    path('api/v1.0/houses/<int:house_id>/images/', views.HouseImageUploadView.as_view()),
    # 房源详情页
    path('api/v1.0/houses/<int:house_id>/', views.HouseDetailView.as_view()),
    # 首页房源推荐
    path('api/v1.0/houses/index/', views.HouseIndexView.as_view()),
    # 首页房源搜索
    path('api/v1.0/houses/search/', views.HouseSearchView.as_view())
]
